﻿@model JSonTest.Orders

@{
		ViewBag.Title = "Edit Order";
		Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>

@using (Html.BeginForm())
{
		@Html.AntiForgeryToken()
		
		<div class="form-horizontal">
				<hr />
				@Html.ValidationSummary(true, "", new { @class = "text-danger" })
				@Html.HiddenFor(model => model.order_number)

				<div class="form-group">
						@Html.LabelFor(model => model.customer_id, "customer_id", htmlAttributes: new { @class = "control-label col-md-2" })
						<div class="col-md-10">
								@Html.DropDownList("customer_id", null, htmlAttributes: new { @class = "form-control" })
								@Html.ValidationMessageFor(model => model.customer_id, "", new { @class = "text-danger" })
						</div>
				</div>

				<div class="form-group">
						@Html.LabelFor(model => model.order_date, htmlAttributes: new { @class = "control-label col-md-2" })
						<div class="col-md-10">
								@Html.EditorFor(model => model.order_date, new { htmlAttributes = new { @class = "form-control" } })
								@Html.ValidationMessageFor(model => model.order_date, "", new { @class = "text-danger" })
						</div>
				</div>

				<div class="form-group">
						<div class="col-md-offset-2 col-md-10">
							@*<input type="submit" value="Save" class="btn btn-default"/>*@
								<button type="submit" value="Save" class="btn btn-success"><span class="glyphicon glyphicon-save">&nbsp;</span>Save</button>

						</div>
				</div>
		</div>
}

<div>
		@*@Html.ActionLink("Back to List", "Index")*@
		<a href="@Url.Action("Orders", "Home")" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left">&nbsp;</span>Back to List</a>
</div>
